import http from '@/utils/http'
import { testModel, ListParm, addBaseLine } from './testModel'
enum Api {
  getDepartment = '/api/department/list',
  AddBaseLinePage = '/task/taskBaselineAdd',
  AddTestCaseApi = '/testCase/add',
  getTestCaseList = '/testCase/liat',
  TestFileApi = '/testCase/upload',
  testCaseDownload = '/testCase/download',
  testCaseDelApi = '/testCase/delete',
  editFileVersionApi = '/task/updateVersion',
  gethuResourList = '/homePage/countPeople'
}
export const testCaseDownload = async (url) => {
  return http.postParams(url)
}
export const getDepartmentApi = async (params: ListParm) => {
  return http.get(Api.getDepartment, params)
}
// 添加新基线
export const AddBaseLineApi = async (data) => {
  return http.post(Api.AddBaseLinePage, data)
}
// 修改文件版本
export const editFileVersionApi = async (data) => {
  return http.post(Api.editFileVersionApi, data)
}
// 添加测试用例
export const AddTestCaseApi = async (data) => {
  return http.post(Api.AddTestCaseApi, data)
}
// 添加测试用列表
export const getTestCaseList = async () => {
  return http.get(Api.getTestCaseList)
}
// 测试用例接口
export const TestFileApi = async (data) => {
  return http.newPost(Api.TestFileApi, data)
}
// 测试用例删除接口
export const testCaseDelApi = async (params) => {
  return http.deleteApi(Api.testCaseDelApi, params)
}
// 项目各阶段人力资源统计
export const gethuResourList = async () => {
  return http.get(Api.gethuResourList)
}